package DesignPatern.A10_责任链模式.QSB.A03_通用责任链模式;

/**
 * @Author: Du
 * @Date: 2021/7/30 10:31
 */
public class A01_Main
{
    public static void main(String[] args)
    {
        //声明所有的处理节点
        Handler handler1 = new ConcreteHandler1();
        Handler handler2 = new ConcreteHandler2();
        Handler handler3 = new ConcreteHandler3();
        //设置链中的处理顺序
        handler1.setNext(handler2);
        handler2.setNext(handler3);
        //提交请求返回结果
        Response response = handler1.handleMessage(new Request());
    }
}
